package org.test.joda;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;

/**
 * Created by Hy on 2018/7/19.
 */
public class Java8TimeTest1 {
    public static void main(String[] args) {
        LocalDateTime dt1 = LocalDateTime.of(2017, Month.APRIL, 18, 13, 45, 20);
        System.out.println(dt1);//2017-04-18T13:45:20
        LocalDate localDate = dt1.toLocalDate();
        LocalTime localTime = dt1.toLocalTime();
        System.out.println("date1========"+localDate+"time1========="+localTime);//date1===2017-04-18time1===13:45:20

        LocalDate localDate1 = LocalDate.of(2018,03,30);
        LocalTime localTime1 = LocalTime.of(12, 23, 20);
        LocalDateTime localDateTime = LocalDateTime.of(localDate1, localTime1);
        System.out.println(localDateTime);
    }
}
